findElementByCssSelector

abstract fun findElementByCssSelector(cssSelector: String): Optional<Element>

Returns the first Element object found in the current search context by the given cssSelector. Returns an empty Optional if no element was found.

Parameters

cssSelector

a string that represents the CSS selector

Throws

if the given cssSelector is empty

when this instance is closed